<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
       <script>
           var  yuwen = parseInt( window.prompt("请输入语文成绩"));
           var  shuxi =   parseInt( window.prompt("请输入数学成绩"));
           var  yinyu =    parseInt(window.prompt("请输入英语成绩"))    ;
           var  huaxue =    parseInt( window.prompt("请输入化学成绩"))    ;
           var  lishi = parseInt(window.prompt("请输入历史成绩"))    ;
          var sum =  (yuwen+shuxi+yinyu+huaxue+lishi)/5/10;

           
           switch (sum){
          case  10:
              alert ("优秀");
             break; 
           case  9:
           alert("优秀")
           break;
           case 8:
           alert("良好")
            break;
            case 7:
            alert ("一般");
            case 6:alert("较差")
             break;
            
            default:
            alert("很差")
            break;
           }

       </script>
        

</body>
</html>